<%@ page language="java" import= "java.util.*" import= "java.sql.*" import = "orm.*"  pageEncoding="utf-8" errorPage="errorPage.jsp"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href = <%=basePath%> />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>站内信</title>
<link href="css/sStyles.css" rel="stylesheet" type="text/css" />
</head>
<% User stu  =(User) session.getAttribute("Student");
    if(stu ==null)
       response.sendRedirect(path + "/index.jsp");
%>

<body>
	<!-- CONTAINER START -->
<div id = "container">
<!-- HEADER START -->
        <div id = "top">
        	<div id = "navigation">
            	<html:link forward = "go_to_student" styleClass="link">&nbsp;&nbsp;&nbsp;&nbsp;首页</html:link>
        	    <html:link forward = "go_to_stu_notice" styleClass="link">&nbsp;&nbsp;&nbsp;&nbsp;通知</html:link>
        	    <html:link href="startexam.do?action=selectcourse" styleClass="link">&nbsp;&nbsp;&nbsp;&nbsp;考试中心 </html:link>
                <html:link page="/index.jsp" styleClass="link">&nbsp;&nbsp;&nbsp;&nbsp;成绩查询</html:link>
                <html:link page="/message.jsp" styleClass="link">&nbsp;&nbsp;&nbsp;&nbsp;留言板</html:link>
            </div>
        </div>
        <!-- HEADER END -->
        
    <!-- LOGIN START -->
        <div id = "login">
        	<div id = "name">
        	<%=stu.getRealname() %>
            </div>
            <html:link page="/student/studentInfo.jsp" styleClass="viewInfo">·查询个人信息</html:link>
        	<p><html:link page="/student/stuModifyPwd.jsp" styleClass="modifyPwd">·修改密码</html:link></p>
        	<p><html:link page="/student/letter.jsp" styleClass="letter">·站内信</html:link></p>
            <p><html:link forward="logout" styleClass="logout">·注销登陆</html:link></p>
  </div>
        <!-- LOGIN END -->
        
        <!-- CLOCK START -->
  <div id = "clock">
           <iframe src="index/clock.html" height="407" width="296" frameborder="0" scrolling="no"
            	marginheight="0" marginwidth="0" id="clockFrame" name="clockFrame"></iframe>
</div>
        <!-- CLOCK END -->
        
        <!-- MAIN START -->
      	<div id = "main">
        	<div id = "title">≡站内信≡
            <hr />
            </div>
            <span id="hr1"><hr /></span>
        	<div id = "letter">
            	<div id = "unread">
                	<a href="unread.jsp">【未读】</a>
                	<table width="604">
                		<tr>
                			<td width="312" class="topic"><a href="letterDetail.jsp">你啊你...</a></td>
                            <td width="105" class="user">lhb</td>
                        	<td width="171" title="time">2011-03-30 21:00</td>
                    	</tr>
                	</table>
                </div>
                <div id = "readed">
                	<a href="readed.jsp">【已读】</a>
                	<table width="604">
                		<tr>
                			<td width="313" class="topic"><a href="letterDetail.jsp">你啊你...</a></td>
                            <td width="110" class="user">liwenhao</td>
                        	<td width="165" title="time">2011-03-30 21:00</td>
                    	</tr>
                	</table>
                </div>
            </div>
            <span id="hr2"><hr /></span>
            <div id="sendLetter">
            	<form action="" name="sendLetter" method="post">
            	<table width="691">
                	<tr>
                    	<td width="194" align="right"><label>收信人用户名：</label></td>
                        <td width="262"><input type="text" name="letterUsername" /></td>
                   	</tr>
                    <tr>
                    	<td align="right"><label>主题：</label></td>
                        <td><input type="text" name="topic" /></td>
                        <td width="214"><span id="attention">（不超过20个字符）</span></td>
                    </tr>
                    <tr>
                    	<td align="right"><label>内容：</label></td>
                        <td><textarea name="content" cols="35" rows="3"></textarea></td>
                        <td><span id="attention">（不超过200个字符）</span></td>
                    </tr>
                    <tr>
                    	<td align="right"><label>验证码：</label></td>
                        <td><input type="text" name="code" /></td>
                        <td><img src="../images/code.jsp" /></td>
                    </tr>
                    <tr>
                    	<td align="right"><input type="submit" value="发送" name="send" 
                        						 style="width:50px; height:25px; font-size:18px;" /></td>
                        <td><input type="reset" value="重置" name="reset" style="width:50px; height:25px; font-size:18px;" /></td>
                    </tr>
                </table>
              </form>
            </div>
      	</div>
   	<!-- MAIN END -->
        
   	<!-- FOOTER START -->
   	<div id = "footer">
  </div>
   	<!-- FOOTER END -->
        
  </div>
    <!-- CONTAINER END -->
    
</body>
</html>
